// 泛型: 动态类型

function fn<T>(params: T): T {
  return params
}

fn<number>(1234)
fn<boolean>(true)

interface Person<T> {
  name: string
  age: T
}

export const o: Person<number | boolean> = {
  name: '张三',
  age: 18
}
export const o1: Person<string> = {
  name: '里斯',
  age: "18"
}